package com.tinem.platform.module.starter.jpa.entity.rbac;

import com.tinem.platform.module.starter.jpa.entity.rbac.key.RbacUserAuthoritiesKey;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className RbacUserAuthorities
 * @description 用户权限表
 * @site
 * @company
 * @create 2021-10-29
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_rbac_user_authorities")
@ApiModel("用户权限表")
@IdClass(RbacUserAuthoritiesKey.class)
public class RbacUserAuthorities implements Serializable,Cloneable{
    @Id
    @Column(name = "c_user_id",nullable=true)
    @ApiModelProperty(name = "userId", value = "",required = true)
    private String userId;
    @Id
    @Column(name = "c_authority",nullable=true)
    @ApiModelProperty(name = "authority", value = "",required = true)
    private String authority;

}